package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:46
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_auth_user")
@ApiModel(value = "SpiderAuthUserEntity对象", description = "")
public class SpiderAuthUserEntity extends Model<SpiderAuthUserEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("租户id")
    @TableField("tenant_id")
    private Long tenantId;

    @ApiModelProperty("用户名称")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty("用户账号")
    @TableField("user_account")
    private String userAccount;

    @ApiModelProperty("用户密码")
    @TableField("user_password")
    private String userPassword;

    @ApiModelProperty("用户头像")
    @TableField("user_icon")
    private String userIcon;

    @ApiModelProperty("用户邮箱")
    @TableField("user_email")
    private String userEmail;

    @ApiModelProperty("用户电话")
    @TableField("user_phone")
    private String userPhone;

    @ApiModelProperty("用户性别，0：未知；1：男；2：女")
    @TableField("user_gender")
    private Integer userGender;

    @ApiModelProperty("用户状态，1：被禁用；2：正常使用；3：已删除")
    @TableField("user_status")
    private Integer userStatus;

    @ApiModelProperty("用户所在地")
    @TableField("user_location")
    private String userLocation;

    @ApiModelProperty("用户工作")
    @TableField("user_job")
    private String userJob;

    @ApiModelProperty("用户受教育程度")
    @TableField("user_education")
    private String userEducation;

    @ApiModelProperty("用户简介")
    @TableField("user_desc")
    private String userDesc;

    @ApiModelProperty("用户生日")
    @TableField("user_birthday")
    private LocalDateTime userBirthday;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
